Focus assist system and method

ABSTRACT

The invention relates to image focus. In particular, it relates to a focus assist system that conveys focus level data to a user. There are a wide variety of different display methods, including, but not limited to, graphs, highlights, symbols, and varied levels of brightness or color.

BACKGROUND

1. Field of the Invention

The invention relates to providing focus information.

2. Description of the Related Art

There are two basic methods of focusing a camera or optical instrument.

In an autofocus system, the camera sets the focus level with little orno user input. The camera collects data about the relative focus levelof objects in the camera lens. It uses an algorithm to interpret thatdata and set an optimum focus level. However, this algorithm does notnecessarily execute the photographer's intentions. Many autofocusalgorithms prioritize objects that are close to the center of the frameor that are brightly lit. If the object of the photographer's interestis off-center or dimly lit, the autofocus algorithm may calibrate afocus level based on objects in which the photographer has no interest.

Manual focus cameras require more effort from the user. But, they alsogive the photographer more control over the focus level. Because manualfocus cameras are more responsive to the user's wishes and potentiallymore precise, professionals often use manual focus cameras.

Whichever system a camera employs—autofocus or manual focus—the abilityof the system to yield desirable results depends on the user's abilityto confirm which objects are in or out of focus. In an autofocus system,if it is unclear which objects are in or out of focus, the user cannotconfirm that the autofocus algorithm has identified the user's primaryobjects of interest and set the focus level accordingly. In a manualfocus system, if a user cannot confirm which objects are in or out offocus, the user cannot confirm the precision of focus adjustments.

Camera displays may be too small or imprecise to reliably convey to theuser whether or not an object is in focus, or if out of focus, just howmuch out of focus. They do not often allow the user to distinguishbetween gradations in the focus level or balance the focus level betweenmultiple objects in the viewfinder.

SUMMARY

An optical lens having a variable focal length is used to detect animage. The lens focuses the image on a sensor, and the sensor capturesinformation corresponding to individual picture elements (pixels). Adisplay shows the detected image.

In order to assist a user adjust the focus of the image, a waveformindicates a degree of focus. The waveform may be superimposed on theimage, or may be displayed adjacent to the image. Alternatively, thewaveform may be displayed on a separate screen. The waveform is updatedin real-time, allowing the user to adjust the focus contemporaneously.The display of the degree of focus could be used, e.g., for stillcameras and motion picture cameras.

The optical sensor converts the image from the lens into atwo-dimensional, digital array of pixels, with the array of pixelsarranged in rows and columns. In one embodiment, a processor operates ona row of pixels to determine focus level data for a plurality of pixelsin that row.

The waveform may indicate the degree of focus through color variations,intensity variations, density variations, amplitude variations, or othervisual indicia. A combination of different types of indicia may be used.

The focus level data may be determined, for example, with an edgedetection algorithm. In one embodiment, the focus level data isdetermined by comparing at least a portion of the digital array ofpixels with a blurred rendition of the same portion of the array.

In one embodiment, an image is detected using a two-dimensional array ofoptical sensors. The detected image is converted into a data structurethat represents the detected image as a two-dimensional array of pixelvalues, where the pixel values are representative of an amount of lightdetected by the optical sensors. A blurred image is generated bycombining a selected pixel value with a plurality of pixel values fromthe vicinity of the selected pixel value. The degree of focus is thendetermined by comparing the selected pixel value with a correspondingblurred image pixel value. A visual indication of the degree of focus isthen provided. In one embodiment, the visual indication of the degree offocus may be overlaid on a representation of the detected image. Inanother embodiment, the visual indication of the degree of focus isadjacent to a representation of the detected image. Providing the visualindication of the degree of focus may comprise displaying a waveformcorresponding to the degree of focus. A point on the waveform maycorresponds to an average degree of focus for a plurality of verticallyaligned pixels. In another embodiment, a point on the waveform maycorrespond to an average degree of focus for a plurality of horizontallyaligned pixels. In yet another embodiment, a point on the waveform maycorrespond to an average degree of focus for a plurality of pixels in ablock. In a further embodiment, a point on the waveform corresponds toan average degree of focus for a plurality of non-adjacent pixels.

In one embodiment, a method of providing feedback to allow focusing animage in real time comprises using a programmed algorithm to determine adegree of focus of a plurality of regions and providing a visualindication of the degree of focus of each region. The visual indicationmay take a variety of formats, such as, for example, a waveform, varyingthe relief of a region, or indication of focus by a geometric figure.The region may be, for example, a line or a regular geometric pattern.In one embodiment, the degree of focus of a region may indicated byvarying the color of the region. In another embodiment, the degree offocus of a region may be indicated by varying the brightness of theregion. The regions may be described by edge detection, and the degreeof focus of each region may be indicated by varying, e.g., thebrightness or color of an edge.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features will now be described with reference to thedrawings summarized below. These drawings and the associated descriptionare provided to illustrate a preferred embodiment of the invention, andnot to limit the scope of the invention.

FIG. 1 shows a horizontal line graph conveying focus level data.

FIG. 2 shows a vertical line graph conveying focus level data.

FIG. 3 shows a horizontal line graph conveying focus level data withthree separate lines.

FIG. 4 shows a grid overlaid on an image, by which grid, focus leveldata may be calculated or displayed.

FIG. 5 shows highlights around objects, which highlights convey focuslevel data.

FIG. 6 shows a high-level diagram of the focus assist system.

FIG. 7 shows a horizontal line graph conveying focus level data from ahorizontal scan line.

FIG. 8 shows a horizontal line graph conveying focus level data from ascan line, wherein the focus level data has been calculated using anedge detection algorithm.

FIG. 9 shows a vertical line graph conveying focus level data from avertical scan line.

FIG. 10 shows horizontal and vertical line graphs conveying focus leveldata from horizontal and vertical scan lines, respectively.

FIG. 11 shows a horizontal line graph conveying focus level data from asloped scan line.

FIG. 12 shows a horizontal line graph conveying focus level dataaveraged from three scan lines.

FIG. 13 shows a horizontal line graph conveying focus level dataaveraged from a scan line greater than one pixel wide.

FIG. 14 shows a horizontal line graph conveying focus level data withthree separate lines, each of which lines corresponds to a differenthorizontal scan line.

DETAILED DESCRIPTION

The following description of different implementations has beenpresented by way of example only, and should not be read in a limitingsense. The scope of the present invention is defined only by the claims.

In one embodiment, a camera displays focus level data to a user. Thefocus level data may be superimposed on the primary viewfinder screen,or it may be displayed on a secondary screen. Various optical imagingsystems—such as the motion picture camera or the photo camera-mightgenerate and display focus level data. However, the invention is notlimited to cameras. Any optical imaging system can display focus levelinformation to the user. Examples include light microscopes, telescopes,or binoculars. Similarly, non-optical instruments that produce an imagecan also display focus level information to the user. An example is anelectron microscope. Further, an algorithm can generate and displayfocus level data to the user for images or videos after they have beenrecorded.

A wide variety of different display techniques convey focus level datato the user. For instance, FIG. 1 shows a line graph 300 oriented belowthe image 302. Alternatively the camera or display might show the linegraph superimposed on the image. The line graph 300 displays highervalues 304 for objects in greater focus 306. It displays lower values308 for less well focused objects 310. The x-axis 312 represents abaseline level of focus, below which no focus level data is displayed.The x-axis 312 threshold may be set according to a number of differentcriteria. It might reflect some absolute number-value related to theslope of the gradient—the gradient being calculated by an edge detectionalgorithm as explained below. Or, the threshold might be tieddynamically to an average focus level of the entire image. So, thethreshold could be set to 150% or 200% of the average focus level. Thismechanism could be used to eliminate low, “noise” values from thedisplay or to display data only for those display objects considered tobe in focus or relatively in focus.

In one embodiment, the focus level data displayed on line graph 300covers a continuous range of focus level values—or at least continuousin a discrete, digital sense, limited by pixels and sampling rate. Thisdoes not necessarily mean that the values on the line graph 300correspond one for one to the focus level value at a given point on theimage 302. The line graph 300 may be continuous, and yet represent anadjusted function of the raw focus level data that is better perceivedby the user.

A single, horizontal line graph 300 like the one in FIG. 1 might notaccurately convey focus level information for objects orientedvertically in the image. Because the line graph displays only one valuefor each horizontal point, it might obscure different focus levelsoriented vertically with respect to that point.

FIG. 2 shows a vertical line graph 400 display. It displays moreaccurate focus level information for vertically oriented objects, butmight obscure different focus levels for horizontally oriented objects.Another display might combine vertical and horizontal line graphs. Sucha display overcomes some of the disadvantages of either the horizontalor vertical displays alone. But, depending upon how the data ispresented, it may require the user to glance at two different locationsto obtain focus level information for what may be a fleeting image.

FIG. 3 shows another horizontal line graph. However, this horizontalline graph comprises several lines. Each line represents focus levelinformation for a different area of the image 302. For example, one ormore lines 3001 represent focus level information for the top of theimage 302. One or more lines 3002 represent focus level information forthe middle of the image 302. One or more lines 3003 represent focuslevel information for the bottom of the image 302. Where the focus levelis very similar at the top, middle, and bottom of the image, the linesbegin to overlap and intensify.

Other embodiments do not use a graph display. For instance, FIG. 4 showsa grid 712 superimposed on the image 302. The grid 712 itself need notbe visible to the user. But, the grid regions 714 each indicate a focuslevel. One method of indicating focus level is a color tint on theregion 714. So, a very well focused region 714 might have a first colorsuch as a red tint. A very poorly focused region 714 might have a secondcolor such as a violet tint. Regions 714 with focus levels neither verywell nor very poorly focused may carry a tint along the color spectrum,which correspond to their respective focus levels.

Another method of indicating focus level within a grid region 714 is tovary the brightness level of each region 714. A very well focused region714 might have a first, relatively high brightness. A very poorlyfocused region 714 might have a second, relatively low (dark)brightness. Regions 714 with focus levels in between may carry a levelof brightness corresponding their respective focus levels.

Other display embodiments highlight the objects themselves instead ofusing grids or graphs to display focus level data for a general area. InFIG. 5, the most focused object 306 has a bright highlight 818 thattraces the object's edge. The least focused objects 310 have very dimhighlights 822. The brightness of the highlight varies with the focuslevel of the object.

Alternatively, the display might draw a color tint around the edges ofobjects to indicate their respective focus levels. For instance, objectsthat are focused very well 306 would have a first color such as a redtint at their edge. Very poorly focused objects 310 have a second colorsuch as a violet tint at their edge. Objects that are neither very wellnor very poorly focused would carry a tint along their edgecorresponding to their respective focus levels.

Rather than merely highlighting around each object, one embodimentraises the relief of an entire object when it is in focus. Objects thatare out of focus 310 appear either flat or at a negative relief. Focusedobjects 306 rise up from the image, while unfocused objects 310 recede.The relief of each object corresponds to its focus level. Thisimplementation has the advantage that the user can concentrate on theobjects in the viewfinder to glean focus level data. Because thisembodiment is highly intuitive, the user does not need to interpret muchdisplay data to determine the relative focus levels of objects in thedisplay.

FIG. 6 shows an embodiment of the architecture of a camera. The cameracollects visual data 924 from the camera lens 926. The camera recordsthe visual data 924 and displays a representation of the visual data 924on the viewfinder 930. The camera also sends the visual data 924 to aprocessor 928. The processor uses an algorithm to compute focus leveldata 932 for the visual data 924. The processor sends that focus leveldata 932 to the viewfinder, where the user 934 sees it superimposed onthe visual data 924. The viewfinder 930 shows focus level data 932 fromthe processor 928 and visual data 924 from the lens 926contemporaneously.

In an alternative embodiment (not shown), in an autofocus camera, theprocessor that accepts the visual data and computes the focus level datais also the processor that computes focus level data for the autofocussystem. An autofocus system automatically generates focus level data todetermine the proper focus level setting. In this embodiment, that datais reused. Not only does the camera use the focus level data to achievean optimal focus setting, but the data is also sent to the user throughthe viewfinder. The user can then confirm that the autofocus system hasidentified and set the focus level for the object or objects in whichthe user is interested.

The processor uses an algorithm to calculate the focus level datadisplayed to the user.

In one embodiment, the processor blurs image data to create a comparisonimage. For instance, the processor might use a Gaussian or quick boxblur approximation, or convolve the image. The blurred image differsfrom the original image primarily at the edges of focused objects 306.With focused objects 306, the blurring process washes out the sharpcontrast between the edge of the object 306 and its surroundings. Theblurring process creates less change at the edges of unfocused objects310. The soft contrast between an unfocused object 310 and itssurroundings remains a soft contrast in the blurred, comparison image.Because edges are typically composed of the pixels that change the mostduring the blurring process, it is possible to find the edges of focusedobjects.

Several alternative algorithms exist to detect whether or not an imageis in focus. Many of these are “edge detection” algorithms. Examples ofedge detection algorithms can be found in Fundamentals of Digital ImageProcessing by Anil K. Jain, the entirety of which is incorporated hereby reference.

One algorithm uses gradient operators to detect edges. Gradientoperators are masks, or simple matrices, used to generate a gradientmap. Gradient operators, when convolved with pixels in an image, yield agradient map in two orthogonal directions. Similarly, compass operatorsyield a gradient map in a selected number of directions that correspondto compass directions. Once the gradient has been calculated, an edge isidentified by searching for those spots where the gradient exceeds somethreshold. The level of focus, generally, corresponds to the severity ofthe gradient.

Other edge detection algorithms apply a second-order derivative to theimage. The derivative detects rates of change in pixel intensity acrossthe image. Again, the algorithm usually convolves the image with anoperator. Edges are identified by locations where the gradient exceedssome threshold, or more commonly, by searching for spots where thesecond derivative wave-form crosses zero. While zero crossings areuseful to detect edges, they only return a binary value and therefore donot convey precise focus level data. Here again, the focus levelgenerally corresponds to the severity of the gradient at objects' edges.

The gradient measures changes in the intensity of adjacent pixels. Theintensity may be measured according to one or more of several differentelements of each pixel. The intensity may refer to the red, green, orblue content of a pixel or any combination thereof. In YCbCr systems, itmay refer to the luma or chroma component of each pixel or a combinationthereof. In HSV systems, it may refer to the hue, the saturation, or thebrightness components of the pixel, or any combination thereof.Depending on the color space of processing and display systems, theprocessor may use whichever components of the pixels' value that obtainthe optimal gradient map or optimal focus level data.

One way of using an edge detection algorithm to derive focus level datafor an entire image—rather than its edges only—is to use boundaryextraction. By connecting edges, boundaries define the shape of anobject. Assuming that an entire object is in focus if its edges are infocus, the camera can use boundary detection to determine the object'sshape and impute the focus level at the object's edge to the rest of theshape.

A contour following algorithm is a boundary extraction algorithm thatuses a series of horizontal or vertical steps chosen by trial and error.The correct step is determined by whether the step arrives inside oroutside a boundary.

Another boundary extraction algorithm uses the computer scienceprinciple of dynamic programming. With dynamic programming the solutionto a large problem is a function of the solutions to its sub-problems.In the boundary extraction context, that means that optimal sub-pathswill lead to the optimal boundary.

The focus level detection algorithm measures focus level for a selectionof pixels. The number and location of the pixels for which the algorithmcalculates focus level data are a function of the speed of computation,detail of focus level data, and type of focus data desired to bedisplayed to the user.

In one embodiment, the focus level algorithm calculates focus level datafor one or more “scan lines.” The simplest example of the scan lineembodiment is depicted in FIG. 7. In that figure, a single scan line1144 extends horizontally across the image 302. The scan line 1144 neednot be vertically centered. The user can adjust the position of the scanline 1144. The focus level algorithm calculates a focus level value foreach pixel along the scan line 1144 and displays it as a point alongline graph 300. In another embodiment, to save processing time, thefocus level algorithm might measure no more than about 50% or no morethan about 25% of the pixels, such as by measuring only every otherpixel or only one of every several pixels on the scan line 1144. Linegraph 300 shows how the focus level display corresponds to the focuslevel measured at each pixel along the scan line 1144.

In FIG. 8, the scan line 1144 and display technique are identical tothose of FIG. 11. But, instead of a smooth waveform, the line graph 300has spikes. This spiked waveform depicts the data produced by an edgedetection algorithm. The focus level data is more accurate at the edgesof objects. At the edges of bars that are focused 306, the graph 300shows a high value. Likewise, at the edges of bars that are not focused310, the graph 300 shows low values. But, the graph 300 does not showhigh or low values for the middle parts of objects. In the middle partsof objects, the correspondence between high contrast—on which edgedetection algorithms rely—and high focus, is less reliable. This isbecause the middle parts of objects are less likely to have highcontrast values whether they are in focus or not.

The scan line 1344 might be vertically oriented, as in FIG. 9, ratherthan horizontally oriented. A vertical scan line 1344 gives better focuslevel data for a series of objects oriented vertically in theviewfinder. Like the horizontal chart for a horizontal scan line, avertical chart 400 displays focus level data for a vertical scan line.Another, more detailed embodiment depicted in FIG. 10 employs bothvertical 1344 and horizontal 1144 scan lines and both vertical 400 andhorizontal 300 graphs.

The scan line need not run precisely horizontally (or vertically) acrossthe image. The scan line 1144 might run at a slope, as in FIG. 11.

In FIG. 12 the display again consists of a single-line graph 300. And,the algorithm again uses scan lines to identify the pixels for which itwill calculate focus level data. But, instead of using only a singlescan line, the algorithm averages data from multiple scan lines 1144,such as at least two, in some embodiments at least five, and in otherembodiments at least 10 scan lines. Depending on the location of thescan lines and of objects in the image, this technique may improve theaccuracy of the focus level display. The more scan lines 1144 theprocessor employs, the more focus level data it collects and the moreaccurate it will be. But, the more scan lines 1144 the processoremploys, the more computations it must run and the slower it willgenerate focus level data. Again, the camera might use vertical scanlines 1344 instead of or along with horizontal scan lines 1144 for thisor any scan-line technique.

FIG. 13 shows yet another embodiment based on the scan line. However, inthis embodiment, the scan line 1144 is greater than a pixel in width.The scan-line width 1746 may be set to as many or as few pixels asdesired. In fact, this is a variation on the multiple scan-lineembodiment depicted in FIG. 12. A scan line 1144 a number of pixels inwidth 1746 is the same as that same number of adjacent scan lines, eachone pixel in width. For example, the average focus level of a scan line1144 five pixels wide 1746 is identical to the average focus level of 5scan lines 1144, each adjacent to the next. To limit power consumptionor decrease computational time, the processor might calculate focuslevel data only for every other adjacent scan line 1144 or one of everyseveral adjacent scan lines 1144.

The processor need not generate an average focus level for multiple scanlines. FIG. 14 shows a graph display with a graph line 3001-03corresponding to each scan line 1144. Alternatively, each graph linemight convey average focus level data from multiple scan lines as an aidto the user.

In addition, the processor 928 might apply a secondary filteringalgorithm to the focus level data from one or more scan lines. Forinstance, the processor 928 might apply an algorithm that zeroes allfocus level values below a certain threshold. Such an algorithm might beused to eliminate noise from the display, to avoid distracting the user.The threshold may or may not be set at the same point as the baselinex-axis 312 in the display, depending on the desired height of the linegraph 300 in the display. Indeed, the camera might allow the user to setthe threshold. Like the x-axis 312 baseline, this algorithmic thresholdmight be set according to either an absolute value related to the slopeof the gradient, as calculated by an edge detection algorithm. Or, itmight be a function of the average level of focus of the image. Forinstance, the algorithm might eliminate focus level values for objectsthat have less than a threshold such as about 150% of the average focuslevel of the image. A secondary algorithm might also be used to smooththe focus level data, again to present a simplified, easily perceivedwaveform to the user. This technique might be useful with edge detectionalgorithms, which tend to produce spikes.

In short, the scan line embodiments are not limited by any particularscan lines or choice of pixels within those scan lines. Rather, the scanlines might be implemented in any permutation that satisfies a desiredbalance between computational speed, detail of information, and methodof display to the user.

Scan lines are merely one method of applying a focus level detectionalgorithm. The algorithm might compute focus level information for theentire image, or for some alternative subset of that image. Thatalternative subset may be a geometric area. The geometric area might bedefined by the user or it might be set by an algorithm, for example, totrack a moving object in the viewfinder. The alternative subset mightalso be a pattern of pixels, designed as a representative sampling ofthe image, but at a lower level of detail and therefore requiring fewercomputations.

In order to display focus level data in the pattern of a grid, thealgorithm must calculate focus level data for at least a portion of eachregion within the grid. The algorithm might calculate focus level datafor only a pixel within each region. The algorithm might calculate focuslevel data for the entire region and average the data to display anindication of the focus level.

If the algorithm calculates enough focus level data—at least enough fora representative sampling of the image—it is possible to display to theuser focus level information based on edges superimposed on the image.Because an edge-detection algorithm returns data that corresponds to theedges of each object, the display might use that data to highlight theedges of objects in the viewfinder in real time. This might be done byvarying the brightness of the edges of objects or by drawing a coloraround objects, the shade or width of which would correspond to thedegree of focus.

Algorithms that generate reliable focus level data for entire objectsenable other display techniques. One display varies the relief of anobject according to its focus level. So, in focus objects would bulgeout of the picture and become more prominent than unfocused objects.Similarly, another display renders objects in three dimensions when theyare focused. The further out of focus the object becomes, the flatter itbecomes in display.

It should be understood that the embodiments described herein may beimplemented in a variety of ways. Other embodiments that are apparent tothose of ordinary skill in the art, including embodiments which do notprovide all of the benefits and features set forth herein, are alsowithin the scope of this invention. For example, the camera couldinterface with a physically separate image processing device, such as acomputer, or the image processing capabilities could be implementedwithin the camera. Further, algorithms may be implemented in a varietyof ways, such as in hardware, software, or a combination of hardware andsoftware. While some of the embodiments described herein providespecific details for implementation, the scope of the disclosure isintended to be broad and not limited to the specific embodimentsdescribed. Accordingly, details described in the specification shouldnot be construed as limitations of the claimed invention. Rather, thescope of the claims should be ascertained from the language of theclaims.

1. An apparatus that assists in adjusting a focus of an image,comprising: a lens having variable focal length, said lens producing avisual data image from light that enters the lens; a manual focusadjustment that adjusts the focal length of the lens; an optical sensorthat converts a visual data image from the lens into a two-dimensional,digital array of pixels, the array of pixels arranged in rows andcolumns; a processor configured to operate on at least one row of pixelsto determine focus level data for a plurality of pixels in the at leastone row; and a display, wherein the display shows a data image from thelens and at least one waveform, superimposed on the image, updatedcontemporaneously with the image, depicting the focus level datadetermined by the processor for the at least one row of pixels.
 2. Theapparatus of claim 1, wherein the apparatus is incorporated into amotion picture camera.
 3. The apparatus of claim 1, wherein the at leastone waveform has variable color, with the color variations beingindicative of focus level data.
 4. The apparatus of claim 1, wherein theat least one waveform has variable intensity, with the intensityvariations being indicative of focus level data.
 5. The apparatus ofclaim 1, wherein the at least one waveform has variable density, withthe density variations being indicative of focus level data.
 6. Theapparatus of claim 1, wherein the at least one waveform has variableamplitude, with variations in amplitude being indicative of focus leveldata.
 7. The apparatus of claim 1, wherein an edge detection algorithmis used to determine focus level data.
 8. The apparatus of claim 1,wherein the focus level data is determined by comparing at least aportion of the digital array of pixels with a blurred rendition of thesame portion of the array.
 9. A method of providing an indication of adegree of focus, comprising: detecting an image using a two-dimensionalarray of optical sensors; converting the detected image signals into adata structure that represents the detected image as a two-dimensionalarray of pixel values, where the pixel values are representative of anamount of light detected by the optical sensors; generating a blurredimage by combining a selected pixel value with a plurality of pixelvalues from the vicinity of the selected pixel value; comparing theselected pixel value with a corresponding blurred image pixel value todetermine a degree of focus; and providing a visual indication of thedegree of focus.
 10. The method of claim 9, wherein the visualindication of the degree of focus is overlaid on a representation of thedetected image.
 11. The method of claim 9, wherein the visual indicationof the degree of focus is adjacent to a representation of the detectedimage.
 12. The method of claim 9, wherein providing the visualindication of the degree of focus comprises displaying a waveformcorresponding to the degree of focus.
 13. The method of claim 12,wherein a point on the waveform corresponds to an average degree offocus for a plurality of vertically aligned pixels.
 14. The method ofclaim 12, wherein a point on the waveform corresponds to an averagedegree of focus for a plurality of horizontally aligned pixels.
 15. Themethod of claim 12, wherein a point on the waveform corresponds to anaverage degree of focus for a plurality of pixels in a block.
 16. Themethod of claim 12, wherein a point on the waveform corresponds to anaverage degree of focus for a plurality of non-adjacent pixels.
 17. Amethod of providing feedback to allow focusing an image in real time,comprising: using a programmed algorithm to determine a degree of focusof a plurality of regions; and providing a visual indication of thedegree of focus of each region.
 18. The method of claim 17, wherein thevisual indication comprises at least one waveform.
 19. The method ofclaim 18, wherein the at least one waveforms has variable intensity. 20.The method of claim 18, wherein the at least one waveform issuperimposed on an image.
 21. The method of claim 17, wherein the degreeof focus of a region is indicated by varying the relief of that region.22. The method of claim 17, wherein the degree of focus of a region isindicated by a geometric figure.
 23. The method of claim 17, whereineach region is a line.
 24. The method of claim 17, where the regions aredescribed by a regular geometric pattern.
 25. The method of claim 24,where the degree of focus of each region is indicated by varying thecolor of each region.
 26. The method of claim 24, where the degree offocus of each region is indicated by varying the brightness of eachregion.
 27. The method of claim 17, where the regions are described byedge detection.
 28. The method of claim 27, where the degree of focus ofeach region is indicated by varying the brightness of each edge.
 29. Themethod of claim 27, where the degree of focus of each region isindicated by varying the color of each edge.